/**
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
/**
 * 环境
 */
export const env: ENV = 'dev';

/**
 * 配置
 */
const config: CONFIG = {
	dev: {
		serverUrl: 'http://192.168.8.237:8000/soar-api',
		staticUrl: '',
		timeout: 6000,
		tokenName: 'token',
	} as CONFIG,
	test: {
		serverUrl: 'https://lgsoar.cn/soar-api',
		staticUrl: '',
		timeout: 6000,
		tokenName: 'token',
	} as CONFIG,
	prod: {
		serverUrl: 'http://120.77.39.238',
		staticUrl: '',
		timeout: 6000,
		tokenName: 'token',
	} as CONFIG
}[env];

type ENV = 'dev'|'test'|'prod';
interface CONFIG {
	/**
	 * 服务器地址
	 */
	serverUrl: string;
	staticUrl: string;
	/**
	 * 请求超时时间
	 */
	timeout: number;
	/**
	 * token名称
	 */
	tokenName: string;
}

/**
 * 服务地址
 */
export const serverUrl = config.serverUrl;

/**
 * 静态资源地址
 */
export const staticUrl = config.staticUrl;

/**
 * 请求超时配置
 */
export const timeout = config.timeout;

/**
 * token名称
 */
export const tokenName = config.tokenName;